import { CellRenderer } from "../../../../fl/controls/listClasses/CellRenderer";
import { BaseItem } from "../common/BaseItem";
import { ItemData } from "../../resource/info/ItemData";
//class RewordItemCellRenderer
    
    export  class RewordItemCellRenderer extends CellRenderer
    {
        constructor()
        {
            super();
            this.mouseChildren = true;
            this.initStyle();
            this.createChildren();
            return;
        }

        /* internal  */initStyle(): void
        {
            this.setStyle("upSkin", new Object /* flash.display.Bitmap */());
            this.setStyle("downSkin", new Object /* flash.display.Bitmap */());
            this.setStyle("overSkin", new Object /* flash.display.Bitmap */());
            this.setStyle("selectedDownSkin", new Object /* flash.display.Bitmap */());
            this.setStyle("selectedOverSkin", new Object /* flash.display.Bitmap */());
            this.setStyle("selectedUpSkin", new Object /* flash.display.Bitmap */());
            return;
        }

        /* internal  */createChildren(): void
        {
            this._baseItem = new BaseItem();
            this._baseItem.toolTipType = ItemData.ToolTipType_Forge;
            this._baseItem.isDragAble = false;
            this._baseItem.isThrowAble = false;
            this._baseItem.isDropAble = false;
            this._baseItem.isShowLock = true;
            this._baseItem.setSize(32, 32);
            this._baseItem.x = 3;
            this._baseItem.y = 3;
            this.addChild(this._baseItem);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            if (arg1) 
            {
                this._baseItem.itemData = arg1 as ItemData;
            }
            else 
            {
                this._baseItem.itemData = null;
            }
            return;
        }

        /* internal */ /* var */_baseItem: BaseItem;
    }
